<?php
namespace app\Http\Models;
use Illuminate\Database\Eloquent\Model;

/**
 * Created by PhpStorm.
 * User: wangyongqiang
 * Date: 2017/7/5 20:05
 */
class AuthGroupAccessModel extends Model{
    protected $connection = 'db_main';
    protected $table = 'wp_auth_group_access';

    //protected $fillable = ["guid", "username", "password", "mobile", "reg_time", "reg_ip", "verify_mobile", "is_experience"];

    public $timestamps = false;

    /**
     * 获取用户权限分组
     * @param $uid
     * @return bool
     */
    public static function getGroupIdByUid($uid){
        if(!$uid) return false;

        return self::where(['uid'=>$uid])->first();
    }
}